const admin = require('./table/admin.js')//管理员表
const customer = require('./table/customer.js')//顾客表
const myorder = require('./table/myorder.js')//引入订单表
const orderTracking = require('./table/orderTracking.js')//引入订单跟踪信息表
const room = require('./table/room.js')//引入房间表
const roomType = require('./table/roomType.js')//引入房间类型表
const timeExtension = require('./table/timeExtension .js')//续费延长信息表 
const vipLevel = require('./table/vipLevel.js')//引入会员登记表
const waiter = require('./table/waiter.js')//服务员表

// room.hasOne(roomType,{ foreignKey:'type'  })//每个房间都有一个房间类型
// roomType.belongsToMany(room,{foreignKey:'type', })//每个房间类型可以有多个房间

const sequelize = require('./config/connect.js')//引入数据库连接文件

//数据表之间的关联关系
sequelize.sync({
    force:true
})
.then(() =>{
    console.log('数据库同步成功')
})
.catch(error =>{
    console.log(error)
})